package com.smile.spring.bean;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2022/3/23 09:57
 */
@Configuration
public class MyBeanConfig {

    @Bean(initMethod = "myInit", destroyMethod = "myDestroyMethod")
    public PersonBean personBean() {
        PersonBean personBean = new PersonBean();
        personBean.setName("李宇航");
        return personBean;
    }
}
